<template>
  <a-card class="dynamic-config" :body-style="{ padding: '10px' }">
    <div class="flex flex-col gap-8">
      <div>{{ t('小数') }}</div>
      <div class="w-full flex justify-between">
        <div class="title text-nowrap">{{ t('对齐') }}</div>

        <div>
          <a-radio-group v-model:value="currentShape.decimal.align" type="button">
            <a-radio value="superscript">{{ t('上标') }}</a-radio>
            <a-radio value="normal">{{ t('正常') }}</a-radio>
            <a-radio value="subscript">{{ t('下标') }}</a-radio>
          </a-radio-group>
        </div>
      </div>

      <div class="w-full flex items-center gap-x-4">
        <div class="title text-nowrap">{{ t('字体大小') }}</div>
        <a-input-number
          v-model:value="currentShape.decimal.fontSize"
          style="width: 100px"
          :min="12"
        ></a-input-number>
      </div>

      <div class="w-full flex items-center gap-x-4">
        <div class="title text-nowrap">{{ t('显示小数点') }}</div>
        <a-switch v-model:value="currentShape.decimal.includeDecimal"></a-switch>
      </div>
    </div>
  </a-card>
</template>

<script setup lang="ts">
import { currentShape } from '@/views/board/core-canvas/data/shapes';

const { t } = useI18n();
</script>

<style lang="scss" scoped>
.dynamic-config {
  white-space: nowrap;
  .title {
    width: 80px;
  }
}
</style>
